package la.iok.hzsvn.lewin.movie.shopmovie.model;

import java.util.Objects;

public class FeesParam {
    /**
     * 收费项名称
     */
    private String name;
    /**
     * 价格,单位分
     */
    private Integer amount;
    /**
     * 数据版本，修改时需要
     */
    private Long version;

    public FeesParam() {
    }

    public FeesParam(String name, Integer amount) {
        this.name = name;
        this.amount = amount;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof FeesParam)) return false;
        FeesParam param = (FeesParam) o;
        return Objects.equals(name, param.name) && Objects.equals(amount, param.amount) && Objects.equals(version, param.version);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, amount, version);
    }

    @Override
    public String toString() {
        return "FeesParam{" +
                "name='" + name + '\'' +
                ", amount=" + amount +
                ", version=" + version +
                '}';
    }
}
